// function fn() {
//     console.log("function is outside of doSomething");
// }
(function () {
    function doSomething() {
        // 检测是否已经存在相同的函数，防止覆盖的情况
        var helper = (typeof fn !== "undefined") ? fn : function () {
            console.log("function is inside doSomething");
        }
        helper();
    }
    doSomething();
})();